package org.jim.core.packets;


import org.jim.core.ImStatus;

import java.util.List;

public class GetGroupListResp extends RespBody {

    private static final long serialVersionUID = 1L;

    private List<Group> groupList;

    /**
     * 用户所属终端;(ws、tcp、http、android、ios等)
     */
    private String terminal;

    public GetGroupListResp(){
        this.setCommand(Command.COMMAND_LOGIN_RESP);
    }

    public GetGroupListResp(ImStatus c10007){
        this.setCommand(Command.COMMAND_LOGIN_RESP);
    }

    public String getTerminal() {
        return terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    public List<Group> getGroupList() {
        return groupList;
    }

    public void setGroupList(List<Group> groupList) {
        this.groupList = groupList;
    }

    public static GetGroupListResp success(){
        return new GetGroupListResp(ImStatus.C10007);
    }

    @Override
    public String toString() {
        return "GetGroupListResp{" +
                "groupList=" + groupList +
                ", terminal='" + terminal + '\'' +
                '}';
    }
}
